{{define "admin/navbar.html"}}
<header class="main-header">

    <!-- Logo -->
    <a href="/admin/index" class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini"><b>W</b></span>
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg"><b>W</b>blog</span>
    </a>

    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
            <span class="sr-only">Toggle navigation</span>
        </a>
        <!-- Navbar Right Menu -->
        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <!-- Notifications: style can be found in dropdown.less -->
                <li class="dropdown notifications-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-bell-o"></i>
                        {{if gt (len .comments) 0}}
                        <span class="label label-warning">{{len .comments}}</span>
                        {{end}}
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header">You have {{len .comments}} comments</li>
                        <li>
                            <!-- inner menu: contains the actual data -->
                            <ul class="menu">
                                {{range .comments}}
                                <li>
                                    <a href="javascript:void(0);" data-href="/admin/comment/{{.ID}}" data-redirect="/post/{{.PostID}}" class="readcomment">
                                        <i class="fa fa-comment text-aqua"></i> {{.Content}}
                                    </a>
                                </li>
                                {{end}}
                            </ul>
                        </li>
                        <li class="footer"><a href="javascript:void(0);" class="readall">View all</a></li>
                    </ul>
                </li>
                <!-- User Account: style can be found in dropdown.less -->
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        {{if gt (len .user.AvatarUrl) 0}}
                        <img src="{{.user.AvatarUrl}}" class="user-image" alt="User Image">
                        {{else}}
                        <img src="/static/libs/AdminLTE/img/user2-160x160.jpg" class="user-image" alt="User Image">
                        {{end}}
                        <span class="hidden-xs">{{.user.Email}}</span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header">
                            {{if gt (len .user.AvatarUrl) 0}}
                            <img src="{{.user.AvatarUrl}}" class="img-circle" alt="User Image">
                            {{else}}
                            <img src="/static/libs/AdminLTE/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                            {{end}}

                            <p>
                                {{.user.Email}}
                                <small>Member since {{dateFormat .user.CreatedAt "Jan.2006"}}</small>
                            </p>
                        </li>
                        <!-- Menu Body --
                        <li class="user-body">
                            <div class="row">
                                <div class="col-xs-4 text-center">
                                    <a href="#">Followers</a>
                                </div>
                                <div class="col-xs-4 text-center">
                                    <a href="#">Sales</a>
                                </div>
                                <div class="col-xs-4 text-center">
                                    <a href="#">Friends</a>
                                </div>
                            </div>
                            <!-- /.row -->
                        </li>
                        <!-- Menu Footer-->
                        <li class="user-footer">
                            <div class="pull-left">
                                <a href="/admin/profile" class="btn btn-default btn-flat">Profile</a>
                            </div>
                            <div class="pull-right">
                                <a href="/logout" class="btn btn-default btn-flat">Logout</a>
                            </div>
                        </li>
                    </ul>
                </li>

            </ul>
        </div>

    </nav>
</header>
{{end}}